<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateModulesTable extends Migration
{
    //提交
    public function up()
    {
        Schema::create('modules', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name')->comment('模块英文标识');
            $table->string('title')->comment('模块中文标识');
            $table->tinyInteger('is_default')->default(0)->comment('是否默认为前台显示');
            $table->tinyInteger('is_home_access')->comment('是否允许前台显示');
            $table->timestamps();
        });
    }

    //回滚
    public function down()
    {
        Schema::dropIfExists('modules');
    }
}
